﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="spMonitor.aspx.cs" Inherits="spWebSite.Workflow.spMonitor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <%=LinkCss %>
    <script type="text/javascript">
        function Show() {
            document.getElementById("divShowHide").style.display = "block";
            document.getElementById("divPic").style.display = "none";
            document.getElementById("divHistory").style.display = "none";
        }
        function Hide() {
            document.getElementById("divShowHide").style.display = "none";
            document.getElementById("divPic").style.display = "block";
            document.getElementById("divHistory").style.display = "block";
        }
    </script>

    <script language="javascript">
        var ie = document.all;
        var nn6 = document.getElementByIdx && !document.all;
        var isdrag = false;
        var y, x;
        var oDragObj;

        function moveMouse(e) {
            if (isdrag) {
                oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px";
                oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px";
                return false;
            }
        }

        function initDrag(e) {
            var oDragHandle = nn6 ? e.target : event.srcElement;
            var topElement = "HTML";
            while (oDragHandle.tagName != topElement && oDragHandle.className != "dragAble") {
                oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement;
            }
            if (oDragHandle.className == "dragAble") {
                isdrag = true;
                oDragObj = oDragHandle;
                nTY = parseInt(oDragObj.style.top + 0);
                y = nn6 ? e.clientY : event.clientY;
                nTX = parseInt(oDragObj.style.left + 0);
                x = nn6 ? e.clientX : event.clientX;
                document.onmousemove = moveMouse;
                return false;
            }
        }
        document.onmousedown = initDrag;
        document.onmouseup = new Function("isdrag=false");
    </script>
    <style type="text/css">
        .dragAble {position:relative;cursor:move;}
        #divShowHide{text-align:center;padding-top:80px;display:none;cursor:pointer;z-Index:100;}
        #divPic{width:800px;text-align:center;cursor:pointer;z-Index:1; overflow-x:scroll;scrollbar-3dlight-color:#BCBCBC;scrollbar-arrow-color:#514F48;scrollbar-base-color:#B2C1E2;height:100%;width:100%;}
        #divShowHide2{position:absolute;width:100%;text-align:center;padding-top:80px;display:none;cursor:pointer;z-Index:100;}
        #divPic2{position:relative;text-align:center;cursor:pointer;z-Index:1;}
    </style>
</head>
<body style="margin:0px">
     <form id="form1" runat="server">
        <div id="divBody">
        <table style="width:100%;">
            <tr>
                <td colspan="2" style="height:100%">
                    <div id="divShowHide"><asp:Image ID="GIF" class="dragAble" runat="server" ondblclick="Hide();" /></div>
                    <div id="divPic" style="width:781px"><asp:Image ID="GIF2" runat="server" ondblclick="Show();" /></div>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="height:1px"></td>
            </tr>
            <tr>
                <td colspan="2">
                <asp:Repeater ID="Details" runat="server">
                    <HeaderTemplate>
                        <table id="divHistory" cellpadding="0" cellspacing="0" style="width:782px" class="divTable">
                            <thead class="Title">
                                <tr style="background:url(../Resource/Images/Icon_TableTitle.gif) repeat-x;">
                                    <td style="width:30px;" align="center">状态</td>
                                    <td>节点</td>
                                    <td style="width:90px;">处理人</td>
                                    <td style="width:130px">接收时间</td>
                                    <td style="width:130px">最后提交时间</td>
                                </tr>
                            </thead>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="Item">
                            <td align="center"><img alt="" src='<%# Eval("Images")%>' /></td>
                            <td><%# Eval("StepLabel")%></td>
                            <td><%# Eval("AssignedToUserName")%></td>
                            <td><%# Eval("StartTime", "{0:yyyy-M-d H:m:s}")%></td>
                            <td><div style='display:<%# Eval("EndTimeHide")%>'><%# Eval("EndTime", "{0:yyyy-M-d H:m:s}")%></div></td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>                
                </td>
            </tr>
        </table>
        </div>
    </form>
</body>
</html>